package action;

import impl.locationimpl;

import java.util.List;

import model.TLocation;
import DAO.location;

import com.alibaba.fastjson.JSON;
import com.opensymphony.xwork2.ActionSupport;

public class addclassifl extends BaseAction {
private TLocation TLocation;

private String bookid;

	public String getBookid() {
	return bookid;
}

public void setBookid(String bookid) {
	this.bookid = bookid;
}

	public TLocation getTLocation() {
	return TLocation;
}

public void setTLocation(TLocation tLocation) {
	TLocation = tLocation;
}

	/**
	 * @return
	 */
	public String execute() {
		location l=new locationimpl();
		
		if (TLocation.getBookid()==null) { 
			TLocation.setBookid(0);
//			String json=JSON.toJSONString(TLocation);
//			System.out.println(json);
			int i=	l.floor(TLocation);
			System.out.println(i);
		}else if (TLocation.getBookid()!=null) {
			int i=	l.floor(TLocation);
			System.out.println(i);
		}
		return SUCCESS;
	}
}